// [[ OnflowGenerator File UUID: 8edbf8058e234f579bca465cfdf2b25a  ]]
package com.itdct.onflow.system.file.controller

import com.itdct.onflow.core.type.*
import com.itdct.onflow.core.vo.RespPageVo
import com.itdct.onflow.core.vo.RespVo
import com.itdct.onflow.system.common.base.BaseSysController
import com.itdct.onflow.system.file.qo.SysTransferCenterFileRelEditQo
import com.itdct.onflow.system.file.qo.SysTransferCenterFileRelSearchQo
import com.itdct.onflow.system.file.service.SysTransferCenterFileRelService
import com.itdct.onflow.system.file.vo.SysTransferCenterFileRelDetailVo
import com.itdct.onflow.system.file.vo.SysTransferCenterFileRelListVo
import io.swagger.v3.oas.annotations.Operation
import io.swagger.v3.oas.annotations.tags.Tag
import org.springframework.http.MediaType
import org.springframework.validation.annotation.Validated
import org.springframework.web.bind.annotation.*

/**
 * @author DCTANT
 * @date 2025-09-28 16:29:56
 * @version 1.0
 * @description 系统传输中心文件关联接口控制
 */
@Tag(name = SysTransferCenterFileRelController.moduleName)
@RestController
@RequestMapping(value = ["/sysTransferCenterFileRel"], produces = [MediaType.APPLICATION_JSON_VALUE], method = [RequestMethod.POST])
class SysTransferCenterFileRelController(
    val sysTransferCenterFileRelService: SysTransferCenterFileRelService
) : BaseSysController() {
    companion object {
        const val moduleName = "系统传输中心文件关联"
    }

    @Operation(summary = moduleName + "添加")
    @PostMapping("/add.adw")
    fun add(@RequestBody @Validated(Add::class) qo: SysTransferCenterFileRelEditQo): RespVo<Long> {
        return sysTransferCenterFileRelService.add(qo, getContext())
    }

    @Operation(summary = moduleName + "更新")
    @PostMapping("/update.adw")
    fun update(@RequestBody @Validated(Update::class) qo: SysTransferCenterFileRelEditQo): RespVo<Unit> {
        return sysTransferCenterFileRelService.update(qo, getContext())
    }

    @Operation(summary = moduleName + "删除")
    @PostMapping("/delete.adw")
    fun delete(@RequestBody @Validated(Delete::class) qo: SysTransferCenterFileRelEditQo): RespVo<Unit> {
        return sysTransferCenterFileRelService.delete(qo, getContext())
    }

    @Operation(summary = moduleName + "详情")
    @PostMapping("/detail.adw")
    fun detail(@RequestBody @Validated(Detail::class) qo: SysTransferCenterFileRelSearchQo): RespVo<SysTransferCenterFileRelDetailVo> {
        return sysTransferCenterFileRelService.detail(qo, getContext())
    }

    @Operation(summary = moduleName + "列表")
    @PostMapping("/page.adw")
    fun page(@RequestBody @Validated(Page::class) qo: SysTransferCenterFileRelSearchQo): RespPageVo<SysTransferCenterFileRelListVo> {
        return sysTransferCenterFileRelService.page(qo, getContext())
    }

// [[ OnflowGenerator Range (- selectFunctions -) Start ]]

// [[ OnflowGenerator Range (- selectFunctions -) End ]]
}